import { createRouter, createWebHistory } from 'vue-router'

import Layout from '@/layout/index.vue'


// 静态路由
export const constantRoutes = [
   {
    path: '/',
    component: Layout,
    redirect: '/home',
    name:'Layout'
    // children: [
      //   {
      //     path: 'home',
      //     component: () => import('@/views/home/index.vue'),
      //     name: 'Home',
      //     meta:{title:'首页',icon:'dashboard',isShow:true}
      // },
      // {
      //     path: 'user',
      //     component: () => import('@/views/user/index.vue'),
      //     name: 'User',
      //     meta:{title:'用户列表',icon:'dashboard',isShow:true}
      // },
      // {
      //     path: 'setting',
      //     component: () => import('@/views/setting/index.vue'),
      //     name: 'Setting',
      //     meta:{title:'系统设置',icon:'dashboard',isShow:true}
      //   }
    // ]
      
    },
 
  {
    path: '/login',
    component: () => import('@/views/login/index.vue'),
  },
   {
	        path: '/:catchAll(.*)',
	        component: () => import('@/views/error/404.vue'),
	    },
]

// 动态路由
export const asyncRoutes = [
]

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: constantRoutes
   
  

})

export default router
